package reflection;

/**
 * @author LiuYan
 * @date 2021/11/15 13:21
 * Java反射
 */
public class Part01 {
    public static void main(String[] args) throws ClassNotFoundException {
        // 只会创建一个Part12对应的Class对象
        Class<?> aClass = Class.forName("reflection.Part01");
        Class<Part01> part12Class = Part01.class;
        Part01 part01 = new Part01();
        Class<? extends Part01> aClass1 = part01.getClass();
        System.out.println(aClass==part12Class);
        System.out.println(part12Class==aClass1);

    }
}
